
package mutsumimod.actions.deprecated;

import com.megacrit.cardcrawl.actions.AbstractGameAction;
import com.megacrit.cardcrawl.actions.common.RemoveSpecificPowerAction;
import com.megacrit.cardcrawl.characters.AbstractPlayer;
import com.megacrit.cardcrawl.dungeons.AbstractDungeon;
import com.megacrit.cardcrawl.powers.AbstractPower;
import com.megacrit.cardcrawl.powers.DexterityPower;
import mutsumimod.actions.BaseAction;

public class MagicCatAction extends BaseAction {

    public MagicCatAction() {
    }


    public void update() {
        AbstractPlayer p = AbstractDungeon.player;
        for(AbstractPower power:p.powers){
            if(power.type.equals(AbstractPower.PowerType.DEBUFF)){
                addToTop(new RemoveSpecificPowerAction(p,p,power));
                int amount=power.amount;
                if(amount>0){
                    applyPowerSelf(new DexterityPower(p,amount),amount);
                }
                isDone=true;
                return;
            }
        }
        isDone=true;
    }

}
